package com.moji.controller.web;


import com.moji.common.base.ApiResult;
import com.moji.entity.MjAboutUs;
import com.moji.entity.dto.QueryAboutUsDto;
import com.moji.service.MjAboutUsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * <p>
 * 关于我们表 前端控制器
 * </p>
 *
 * @author ccl
 * @since 2024-07-20
 */
@RestController
@RequestMapping("/web/mjAboutUs")
@Api(tags = "关于我们web相关接口", value = "关于我们web相关接口")
public class MjAboutUsController {

    @Resource
    private MjAboutUsService mjAboutUsService;

    @PostMapping("/queryByPage")
    @ApiOperation(value = "关于我们_分页查询",response = MjAboutUs.class)
    public ApiResult queryByPage(@RequestBody QueryAboutUsDto dto){
        return ApiResult.ok(mjAboutUsService.queryByPage(dto));
    }

    @PostMapping("/detail")
    @ApiOperation(value = "关于我们_详情",response = MjAboutUs.class)
    public ApiResult detail(@RequestParam("id") Long id){
        return ApiResult.ok(mjAboutUsService.detail(id));
    }
}

